<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="java.util.*"%>
<%@ page import="BLL.*"%>
<%@ page import="Model.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>小高网</title>
<link href="Content/css/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="Content/js/setHomeSetFav.js"></script>
<script type="text/javascript" src="Content/js/myfocus-2.0.1.min.js" charset="utf-8"></script><!--引入myFocus库-->
<script type="text/javascript">
myFocus.set({
    id:'boxID',//焦点图盒子ID
    pattern:'mF_fancy',//风格应用的名称
    time:3,//切换时间间隔(秒)
    trigger:'click',//触发切换模式:'click'(点击)/'mouseover'(悬停)
    width:1000,//设置图片区域宽度(像素)
    height:310,//设置图片区域高度(像素)
    txtHeight:'default'//文字层高度设置(像素),'default'为默认高度，0为隐藏
});
</script>
</head>

<body>

<div class="top">
  <div class="top_content">
    <ul>
      <li><a href="#">
      <%	Cookie c[]=request.getCookies();
      		for(Cookie coo:c){
      			if(coo.getName().equalsIgnoreCase("userName")){
      				%><p><% out.print("欢迎你 "+coo.getValue());%></p><%
      			}
      		}%>
      	</a></li>
      <li><a onclick="AddFavorite(window.location,document.title)" href="javascript:void(0)">加入收藏</a></li>
      <li><a onclick="SetHome(window.location)" href="javascript:void(0)">设为首页</a></li>
    </ul>
  </div>
</div>
<!--页面顶端top结束-->

<div class="wrap">
  <div  class="logo">
    <div class="logo_left"><img src="Content/images/logo.jpg" /></div>
    <div class="logo_right"><img src="Content/images/tel.jpg" width="28" height="28" />24小时服务热线：<span class="tel">113-588-7060</span></div>
  </div>
  <!--logo结束-->
  
  <div class="nav">
    <div  class="nav_left"></div>
    <div class="nav_mid">
      <div class="nav_mid_left">
        <ul>
          <li class="active"><a href="Content/index.html">首页</a></li>
          <li><a href="Content/ticket.html">学生动态</a></li>
          <li><a href="Content/informations.html">课程中心</a></li>
          <li><a href="Content/scenery.html">在线课程</a></li>
	  <li><a href="about.jsp">关于我们</a></li>
        </ul>
      </div>
      <!--nav_mid_left结束-->
      <div class="nav_mid_right">
        <form action="" method="post">
          <input type="text" class="search_text" />
          <!--<input type="text" class="search_text" x-webkit-speech />-->
        </form>
      </div>
      <!--nav_mid_right结束--> 
    </div>
    <!--导航主体nav_mid结束-->
    <div class="nav_right"></div>
  </div>
  <!--nav结束-->
  
  <div class="ad">
    <div id="boxID"><!--焦点图盒子-->
      <div class="loading"><img src="Content/images/loading.gif" alt="请稍候..." /></div>
      <!--载入画面(可删除)-->
      <div class="pic"><!--内容列表(li数目可随意增减)-->
        <ul>
          <li><a href="#"><img src="Content/images/ad2.jpg" thumb="" alt="" text="详细描述2" /></a></li>
          <li><a href="#"><img src="Content/images/ig.png" thumb="" alt="" text="详细描述3" /></a></li>
          <li><a href="#"><img src="Content/images/ad4.jpg" thumb="" alt="" text="详细描述4" /></a></li>
          <li><a href="#"><img src="Content/images/ad3.jpg" thumb="" alt="" text="详细描述5" /></a></li>
        </ul>
      </div>
    </div>
  </div>
  <!--ad结束-->
  
  <div class="main">
    <div class="news">
      <div class="title">
        <h2 class="titile_left">新闻中心</h2>
        <span class="title_right"><a href="#">More&gt;&gt;</a></span> </div>
      <!--title结束-->
      
      <div class="pic_news"> <img src="Content/images/news.jpg" alt="520 女神喊你来表白" width="113" height="77" />
        <h2><a href="news.html">520 女神喊你来表白！</a></h2>
        <p>活动时间：5月20日―5月25日<br />
          获奖公布时间：5月26日<br />
          <a href="news.html">Learn More>></a></p>
      </div>
      <!--pic_news结束-->
        <%  List list=new UserBLL().QueryUsers();
        	String pageIndex1=request.getParameter("pageIndex");
			if(pageIndex1==null){
				pageIndex1="0";
			}
			int pageIndex=Integer.parseInt(pageIndex1);  //拿到传递过来的请求的第几条记录
			int pageSize=3;   //就是每一页要显示的数据总记录数
			for(int j=0;j<list.size()/pageSize;j++){
		%>
		<a href='index.jsp?pageIndex=<%= j %>#4F' name="4F"><%= "&nbsp&nbsp&nbsp"+(j+1)+"&nbsp&nbsp&nbsp" %></a>
		<%	}%>
		<span style="float:right"><a href="addUser.jsp">增加&nbsp</a></span>
      <div class="news_list" >
        <ul>
        <% for(int i=pageIndex*pageSize;i<(pageIndex+1)*pageSize;i++){
		User u=(User)list.get(i);
		%>
          <li><span><a href="delete.jsp?i=<%= u.getId()%>" style="float:right;color:red;">&nbsp&nbsp删除</a>
          <a href="updatePic.jsp?i=<%= u.getId()%>" style="float:right;color:blue;">更改</a>
          <%= u.getDate()+"&nbsp&nbsp&nbsp" %></span>
          <a href="pic.jsp?i=<%= u.getId()%>">客户<%= u.getId()+"\t"+u.getUserName()+"\t"+u.getEmail() %></a>
          </li>
        <%} %>
        </ul>
      </div>
      <!--news_list结束--> 
      
    </div>
    <!--news结束-->
    
    <div class="products">
      <div class="title">
        <h2 class="titile_left">课程中心</h2>
        <span class="title_right"><a href="#">More&gt;&gt;</a></span> </div>
      <!--title结束-->
      
      <div class="product_list"><img src="Content/images/css.jpg" alt="CSS圆角进化论" width="158" height="106" />
        <h2><a href="news.html">CSS圆角进化论</a></h2>
        <p> CSS圆角的实现，经历了三大发展阶段：背景图片方式、CSS2.0+HTML标签模拟、CSS3.0圆角属性）。本案例详细讲解每一种的实现方式，并对实现的优缺点进行对比分析。</p>
      </div>
      <!--product_list结束-->
      
      <div class="product_type">
        <ul>
          <li>PHP开发</li>
          <li>前端开发</li>
          <li>JAVA开发</li>
          <li>Android开发</li>
        </ul>
      </div>
    </div>
    <!--products结束-->
    
    <div class="sidebar">
      <div class="video">
        <div class="title">
          <h2 class="titile_left">媒体聚焦</h2>
          <span class="title_right"><a href="#">More&gt;&gt;</a></span> </div>
        <!--title结束-->
        <p class="video_content">
          <embed src="http://player.youku.com/player.php/sid/XMzU5ODk3MzU0OA==/v.swf" allowFullScreen="true" quality="high" width="220" height="140" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash"></embed>
        </p>
      </div>
      <!--video结束-->
      
      <div class="service"> <img src="Content/images/app.jpg" /> </div>
    </div>
    <!--sidebar结束--> 
    
  </div>
  <!--main结束--> 
</div>
<!--最外层wrap结束  -->
<div class="copyright">
  <div class="copyright_content">
    <ul>
      <li>关于
        <ul>
          <li>品牌故事</li>
          <li>联系我们</li>
          <li>加入我们</li>
          <li>版权声明</li>
        </ul>
      </li>
      <li>课程
        <ul>
          <li>PHP开发</li>
          <li>前端开发</li>
          <li>JAVA开发</li>
          <li>Android开发</li>
        </ul>
      </li>
      <li>关注
        <ul>
          <li>新浪微博</li>
          <li>腾讯微博</li>
          <li>企业微信</li>
          <li>QQ空间</li>
        </ul>
      </li>
      <li>留言
        <ul>
          <li>意见反馈</li>
          <li>问题留言</li>
          <li>媒体联络</li>
          <li>在线客服</li>
        </ul>
      </li>
      <li><img src="Content/images/weixin.png" alt="微信关注" width="30" height="27" />微信关注
        <ul>
          <li><img src="Content/images/qrcode.jpg" alt="扫描关注小高网官方微信" width="102" height="102" /></li>
        </ul>
      </li>
    </ul>
  </div>
  <!--copyright_content结束--> 
</div>
</body>
</html>